<?php
// +----------------------------------------------------------------------
// | WaitAdmin快速开发后台管理系统
// +----------------------------------------------------------------------
// | 欢迎阅读学习程序代码,建议反馈是我们前进的动力
// | 程序完全开源可支持商用,允许去除界面版权信息
// | gitee:   https://gitee.com/wafts/waitadmin-php
// | github:  https://github.com/topwait/waitadmin-php
// | 官方网站: https://www.waitadmin.cn
// | WaitAdmin团队版权所有并拥有最终解释权
// +----------------------------------------------------------------------
// | Author: WaitAdmin Team <2474369941@qq.com>
// +----------------------------------------------------------------------
declare (strict_types = 1);

namespace app\backend\validate\user;

use app\common\basics\Validate;

/**
 * 用户分组参数验证器
 */
class GroupValidate extends Validate
{
    protected $rule = [
        'id'      => 'require|posInteger',
        'name'    => 'require|max:30|min:1|unique:userGroup',
        'remarks' => 'max:200',
        'sort'    => 'number|minValue:0'
    ];

    public function __construct()
    {
        $this->field = [
            'name'    => '名称',
            'remarks' => '备注',
            'sort'    => '排序'
        ];

        parent::__construct();
    }
}